403Webshell
Server IP : 121.121.20.254  /  Your IP : 216.73.216.202
Web Server : Microsoft-IIS/10.0
System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64
User : IUSR ( 0)
PHP Version : 8.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python313/Lib/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python313/Lib/test/__pycache__/test_ntpath.cpython-313.pyc
�

��i�5���SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJr SSK	J
r
 SSKJrJ
r
 SSKJr SSK	Jr SSKJr SSKr\R* SrSSKrSrS
rSrSrS
r"SS\R<5r"SS\5r "SS\RB\R<5r""SS\5r#\$S:Xa\RJ"5 gg!\a SrN�f=f!\a S	rN�f=f!\a S	rN�f=f)�N)�
ALLOW_MISSING)�support)�	os_helper�
is_emscripten)�FakePath)�test_genericpath)�
TemporaryFileTFc��[R"SSS9Rn[R[R[R/Ul[RUlU"USS5nU(d-[SR[R"555e[R"U5nU"XU5nUSU$)N�kernel32T)�use_last_errorrz&failed to get short path name 0x{:08X})�ctypes�WinDLL�GetShortPathNameW�	c_wchar_p�c_uint32�argtypes�restype�OSError�format�get_last_error�create_unicode_buffer)�path�GSPN�
result_len�results    �%C:\Python313\\Lib\test\test_ntpath.py�_getshortpathnamer%s����}�}�Z��=�O�O���)�)�6�+;�+;�V�_�_�M��
�������$��a�(�
���B�!�6�&�"7�"7�"9�:�<�
<��-�-�j�9���$�
�3�
��k�z�"�"�c���[U[[[R45(a*[
R"[R"U55$[US5(a[SU55$U$)N�__iter__c3�v# �UH/n[R"[R"U55v� M1 g7f�N)�ntpath�normcase�os�fsdecode)�.0�ps  r�	<genexpr>�_norm.<locals>.<genexpr>5s$���C�d��V�_�_�R�[�[��^�4�4�d�s�79)
�
isinstance�bytes�strr%�PathLiker#r$r&�hasattr�tuple)rs r�_normr11sU���$���R�[�[�1�2�2����r�{�{�4�0�1�1�	��z�	"�	"��C�d�C�C�C��Krc	��URSS5n[U5nX:waT[U5[U5:wa<[R"[U5<S[U5<S[U5<35eURSS5nURSS5nURS	S
5nURSS5nURS
S5nURSS5n[R"U5RS5nURSS5RS5n[R"5 [R"S[5 [U5nSSS5 [U5[U5:wa<[R"[U5<S[U5<S[U5<35eg!,(df   Nc=f)N�\�\\z should return: z but returned: z('z(b'z("z(b"z['z[b'z["z[b"z, 'z, b'z, "z, b"�latin1�ascii�backslashreplace�ignore)�replace�evalr1r�
TestFailedr-r%�fsencode�decode�encode�warnings�catch_warnings�simplefilter�DeprecationWarning�repr)�fn�
wantResult�	gotResults   r�testerrG9sk��	���D�&�	!�B��R��I���5��#4��i�8H�#H�� � ��B���Z��#�i�.�":�;�	;�
���D�%�	 �B�	���D�%�	 �B�	���D�%�	 �B�	���D�%�	 �B�	���E�6�	"�B�	���E�6�	"�B�	���R��	�	��	)�B�	���7�.�	/�	6�	6�w�	?�B�	�	 �	 �	"����h�(:�;���H�	�
#�
�Z��E�)�,�,�� � ��B���Z��$�y�/�";�<�	<�-�
#�	"�s�>'G�
Gc�.�[R"SUSS9$)N�kwargsT)�_do_cleanups)r�subTests)�
parameterss r�
_parameterizerMQs�����H�j�t�D�Drc� �\rSrSrSrSrSrg)�NtpathTestCase�Uc�b�X:Xd[U5[U5:XagURX5 gr")r1�assertEqual)�self�path1�path2s   r�assertPathEqual�NtpathTestCase.assertPathEqualVs'���>�U�5�\�U�5�\�9������&rc�L�UR[U5[U55 gr")�assertInr1)rSr�pathsets   r�assertPathIn�NtpathTestCase.assertPathIn[s���
�
�e�D�k�5��>�2r�N)�__name__�
__module__�__qualname__�__firstlineno__rVr[�__static_attributes__r]rrrOrOUs��'�
3rrOc�t�\rSrSrSrSrSrSrSrSr	Sr
S	rS
rSr
SrS
rSrSrSrSrSrSrSrSr\R2\R6"\S5\"0SS0S\05S555r\R2\R6"\S5S55r \R6"\S5S5r!\R6"\S5\"0SS0S\05S55r"\R2\R6"\S5\"0SS0S\05S555r#\R2\R6"\S5S55r$\R2\R6"\S5S55r%\R2\R6"\S5S 55r&\R2\R6"\S5S!55r'\R2\R6"\S5\"0SS0S\05S"555r(\R6"\S5S#5r)\R6"\S5\R6"\*S$5S%55r+\R6"\S5S&5r,S'r-\R6"\R\S(5S)5r/\0Rb"S*5S+5r2S,r3\R6"\4S-5S.5r5S/r6S0r7S1r8\Rr"\:S25S35r;S4r<S5r=S6r>S7r?\R6"\4S85S95r@\Rr"\AR�S::gS;5S<5rCS=rD\Rr"\AR�S::gS>5S?5rE\R6"\F"\GS@5SA5SB5rH\Rr"\AR�S::gSC5SD5rI\Rr"\AR�S::gSC5SE5rJ\Rr"\AR�S::gSF5\0R�SG55rL\Rr"\GR�SH:gSI5SJ5rN\Rr"\GR�SH:HSK5SL5rOSMrPgN)O�
TestNtpath�_c���[SS5 [SS5 [SS5 [SS5 [S	S
5 [SS5 [S
S5 [SS5 [SS5 [SS5 g)Nzntpath.splitext("foo.ext"))�foo�.extzntpath.splitext("/foo/foo.ext"))z/foo/foorhzntpath.splitext(".ext"))rh�zntpath.splitext("\foo.ext\foo"))z\foo.ext\foorizntpath.splitext("foo.ext\"))zfoo.ext\rizntpath.splitext("")�ririzntpath.splitext("foo.bar.ext"))zfoo.barrhz!ntpath.splitext("xx/foo.bar.ext"))z
xx/foo.barrhz!ntpath.splitext("xx\foo.bar.ext"))z
xx\foo.barrhzntpath.splitext("c:a/b\c.d"))zc:a/b\cz.d�rG�rSs r�
test_splitext�TestNtpath.test_splitext`sw���+�_�=��0�2F�G��(�,�7��2�4J�K��-�/@�A��$�h�/��/�1D�E��2�4J�K��3�5L�M��.�0B�Crc��[SS5 [SS5 [SS5 [SS5 [S	S
5 [SS5 [S
S5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS 5 [S!S"5 [S#S$5 g)%Nzntpath.splitdrive('')rjzntpath.splitdrive('foo'))rirgzntpath.splitdrive('foo\bar'))ri�foo\barzntpath.splitdrive('foo/bar'))ri�foo/barzntpath.splitdrive('\'))rir3zntpath.splitdrive('/'))ri�/zntpath.splitdrive('\foo\bar'))ri�\foo\barzntpath.splitdrive('/foo/bar'))ri�/foo/barzntpath.splitdrive("c:foo\bar"))�c:rpzntpath.splitdrive("c:foo/bar"))rurqzntpath.splitdrive("c:\foo\bar"))rurszntpath.splitdrive("c:/foo/bar"))rurtzntpath.splitdrive('\\'))r4rizntpath.splitdrive('//'))�//riz/ntpath.splitdrive("\\conky\mountpoint\foo\bar"))�\\conky\mountpointrsz/ntpath.splitdrive("//conky/mountpoint/foo/bar"))�//conky/mountpointrtz-ntpath.splitdrive("\\?\UNC\server\share\dir"))�\\?\UNC\server\sharez\dirz-ntpath.splitdrive("//?/UNC/server/share/dir"))�//?/UNC/server/sharez/dirrkrls r�test_splitdrive�TestNtpath.test_splitdrivels����&��1��)�;�7��.�0@�A��-��?��(�*�5��'��3��0�2D�E��.�0@�A��0�2D�E��/�1B�C��2�4H�I��0�2D�E��*�L�9��(�*�5��E�6�	8��@�1�	3��D�5�	7��>�/�	1rc��[RnURU"S5S5 URU"S5S5 URU"S5S5 [RS:XaFUR[US5 UR[US	5 UR[US
5 gURU"S5S5 g)
N�\\server\share\dir)�\\server\sharez\dir�\\server\share\dir)�\\server\shares\dir�
\\�\�\�)�	\\�\�u\��win32�
\\�\share\dir�\\server\�\dir�\\server\share\��\\�\�\�)�\\�\�s\�)r#�
splitdriverR�sys�platform�assertRaises�UnicodeDecodeError)rSr�s  r�test_splitdrive_invalid_paths�(TestNtpath.test_splitdrive_invalid_paths�s����&�&�
�����$H�I�C�	E�����$I�J�E�	G�����$@�A�;�	=��<�<�7�"����0�*�>U�V����0�*�>V�W����0�*�>X�Y����Z�(?�@�;�
=rc��[SS5 [SS5 [SS5 [SS5 [S	S
5 [SS5 [S
S5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS 5 [S!S"5 [S#S$5 [S%S&5 [S'S(5 [S)S*5 [S+S,5 [S-S.5 [S/S05 [S1S25 [S3S45 UR[R"S55S65 [S7S85 [S9S:5 [S;S<5 [S=S>5 [S?S@5 [SASB5 [SCSD5 [SESF5 [SGSH5 [SISJ5 [SKSL5 [SMSN5 [SOSP5 [SQSR5 [SSST5 [SUSV5 [SWSX5 [SYSZ5 [S[S\5 [S]S^5 [S_S`5 [SaSb5 [ScSd5 [SeSf5 [SgSh5 [SiSj5 [SkSl5 [SmSn5 [SoS(5 [SpSq5 [SrSs5 [StSu5 [SvSw5 [SxSy5 [SzS{5 g)|Nzntpath.splitroot(''))riririzntpath.splitroot('foo'))ririrgzntpath.splitroot('foo\bar'))ririrpzntpath.splitroot('foo/bar'))ririrqzntpath.splitroot('\'))rir3rizntpath.splitroot('/'))rirrrizntpath.splitroot('\foo\bar'))rir3rpzntpath.splitroot('/foo/bar'))rirrrqzntpath.splitroot("c:foo\bar"))rurirpzntpath.splitroot("c:foo/bar"))rurirqzntpath.splitroot("c:\foo\bar"))rur3rpzntpath.splitroot("c:/foo/bar"))rurrrqzntpath.splitroot('c:\\a'))rur3�\azntpath.splitroot('c:\\\a/b'))rur3z\\a/bzntpath.splitroot('c:/\'))rurrr3zntpath.splitroot('c:\/'))rur3rrzntpath.splitroot('/\a/b\/\'))z/\a/br3z/\zntpath.splitroot('\/a\b/\/'))z\/a\brrz\/zntpath.splitroot('\\'))r4ririzntpath.splitroot('//'))rvririz.ntpath.splitroot("\\conky\mountpoint\foo\bar"))rwr3rpz.ntpath.splitroot("//conky/mountpoint/foo/bar"))rxrrrqz/ntpath.splitroot("\\\conky\mountpoint\foo\bar"))z\\\conkyr3�mountpoint\foo\barz/ntpath.splitroot("///conky/mountpoint/foo/bar"))z///conkyrr�mountpoint/foo/barz/ntpath.splitroot("\\conky\\mountpoint\foo\bar"))z\\conky\r3r�z/ntpath.splitroot("//conky//mountpoint/foo/bar"))z//conky/rrr�u//conky/MOUNTPOİNT/foo/bar)u//conky/MOUNTPOİNTrrrqzntpath.splitroot("//?/c:"))�//?/c:ririzntpath.splitroot("//./c:"))z//./c:ririzntpath.splitroot("//?/c:/"))r�rrrizntpath.splitroot("//?/c:/dir"))r�rr�dirzntpath.splitroot("//?/UNC"))z//?/UNCririzntpath.splitroot("//?/UNC/"))z//?/UNC/ririz#ntpath.splitroot("//?/UNC/server/"))z//?/UNC/server/ririz(ntpath.splitroot("//?/UNC/server/share"))rzririz,ntpath.splitroot("//?/UNC/server/share/dir"))rzrrr�zIntpath.splitroot("//?/VOLUME{00000000-0000-0000-0000-000000000000}/spam"))z0//?/VOLUME{00000000-0000-0000-0000-000000000000}rr�spamz&ntpath.splitroot("//?/BootPartition/"))z//?/BootPartitionrrriz&ntpath.splitroot("//./BootPartition/"))z//./BootPartitionrrriz&ntpath.splitroot("//./PhysicalDrive0"))z//./PhysicalDrive0ririzntpath.splitroot("//./nul"))z//./nulririzntpath.splitroot("\\?\c:"))�\\?\c:ririzntpath.splitroot("\\.\c:"))z\\.\c:ririzntpath.splitroot("\\?\c:\"))r�r3rizntpath.splitroot("\\?\c:\dir"))r�r3r�zntpath.splitroot("\\?\UNC"))z\\?\UNCririzntpath.splitroot("\\?\UNC\"))z\\?\UNC\ririz#ntpath.splitroot("\\?\UNC\server\"))z\\?\UNC\server\ririz(ntpath.splitroot("\\?\UNC\server\share"))ryririz,ntpath.splitroot("\\?\UNC\server\share\dir"))ryr3r�zIntpath.splitroot("\\?\VOLUME{00000000-0000-0000-0000-000000000000}\spam"))z0\\?\VOLUME{00000000-0000-0000-0000-000000000000}r3r�z&ntpath.splitroot("\\?\BootPartition\"))z\\?\BootPartitionr3riz&ntpath.splitroot("\\.\BootPartition\"))z\\.\BootPartitionr3riz&ntpath.splitroot("\\.\PhysicalDrive0"))z\\.\PhysicalDrive0ririzntpath.splitroot("\\.\nul"))�\\.\nulririzntpath.splitroot("//")zntpath.splitroot("///"))z///ririzntpath.splitroot("///y"))z///yririzntpath.splitroot("//x"))z//xririzntpath.splitroot("//x/"))z//x/ririzntpath.splitroot(" :/foo"))z :rrrgzntpath.splitroot("/:/foo"))rirrz:/foo)rGrRr#�	splitrootrls r�test_splitroot�TestNtpath.test_splitroot�s���%�|�4��(�/�:��-�/C�D��,�.A�B��'��8��&�
�6��/�1G�H��-�/C�D��/�1G�H��.�0E�F��1�3K�L��/�1G�H�	�,�.A�B��0�2I�J�	�*�,=�>��*�,=�>��0�2I�J��0�2I�J�	�)�+;�<��'��8��D�:�	<��?�5�	7��F�9�	;��@�3�	5��F�<�	>��@�6�	8�	
����)�)�*G�H�@�	B�	�+�-?�@��+�-?�@��,�.A�B��/�1G�H��,�.A�B��-�/C�D��4�6Q�R��9�;[�\��=�?c�d��Z�P�	R��7�9W�X��7�9W�X��7�9W�X��,�.A�B��.�0E�F��.�0E�F��0�2I�J��3�5O�P��/�1G�H��1�3K�L��9�;[�\��>�4�	6��C�9�	;��^�T�	V��;�=_�`��;�=_�`��:�<]�^��/�1G�H�	�'��8��(�/�:��)�+;�<��(�/�:��)�+;�<�	�+�-?�@��+�-?�@rc��[RnURU"S5S5 URU"S5S5 URU"S5S5 [RS:XaFUR[US5 UR[US	5 UR[US
5 gURU"S5S5 g)
Nr~)rr3zdirr�)r��\sdirr�)r�r3u�r�r�r�r�r�)r�r���)r#r�rRr�r�r�r�)rSr�s  r�test_splitroot_invalid_paths�'TestNtpath.test_splitroot_invalid_paths�s����$�$�	�����#G�H�G�	I�����#H�I�J�	L�����#?�@�?�	A��<�<�7�"����0�)�=T�U����0�)�=U�V����0�)�=W�X����Y�'>�?�@�
Brc��[SS5 [SS5 [SS5 [SS5 [S	S
5 [SS5 g)
Nzntpath.split("c:\foo\bar"))�c:\foo�barz*ntpath.split("\\conky\mountpoint\foo\bar"))z\\conky\mountpoint\foor�zntpath.split("c:\"))�c:\riz#ntpath.split("\\conky\mountpoint\"))z\\conky\mountpoint\rizntpath.split("c:/"))�c:/riz#ntpath.split("//conky/mountpoint/"))z//conky/mountpoint/rirkrls r�
test_split�TestNtpath.test_split�sP���-�/A�B��@�4�	6�	�%�|�4��8�.�	0�	�$�k�2��4�6Q�Rrc�j�[RnURU"S5S5 URU"S5S5 URU"S5S5 [RS:Xa/UR[US5 UR[US	5 gURU"S
5S5 g)Nzc:\foo\bar)�c:\foozbarsc:\foo\bar)�c:\foosbaru
c:\�\�)�c:\�u�r�sc:\�\barsc:\foo\�sc:\�\�)�c:\���)r#�splitrRr�r�r�r�)rSr�s  r�test_split_invalid_paths�#TestNtpath.test_split_invalid_paths
s�����������5�6�3�	5�����6�7�5�	7�����3�4�1�	3��<�<�7�"����0�%�9I�J����0�%�9I�J����U�#4�5�3�
5rc�$�[SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [S	S5 [S
S5 [SS5 [SS5 [S
S5 [SS5 g)Nzntpath.isabs("foo\bar")rzntpath.isabs("foo/bar")zntpath.isabs("c:\")�zntpath.isabs("c:\foo\bar")zntpath.isabs("c:/foo/bar")z#ntpath.isabs("\\conky\mountpoint\")zntpath.isabs("\foo\bar")zntpath.isabs("/foo/bar")zntpath.isabs("c:foo\bar")zntpath.isabs("c:foo/bar")z"ntpath.isabs("\\conky\mountpoint")zntpath.isabs("\\.\C:")rkrls r�
test_isabs�TestNtpath.test_isabss����)�1�-��(�!�,��%�q�)��-�q�1��+�Q�/��8�!�<�	�+�Q�/��)�1�-��+�Q�/��*�A�.�	�6��:��*�A�.rc�L�[SS5 [SS5 [SS5 g)Nz>ntpath.commonprefix(["/home/swenson/spam", "/home/swen/spam"])z
/home/swenz;ntpath.commonprefix(["\home\swen\spam", "\home\swen\eggs"])z\home\swen\z;ntpath.commonprefix(["/home/swen/spam", "/home/swen/spam"])z/home/swen/spamrkrls r�test_commonprefix�TestNtpath.test_commonprefix+s,���O��	��R��	!��L� �	"rc	�j�[SS5 [SS5 [SS5 [SS5 [SS	5 [S
S5 [SS
5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [S S5 [S!S5 [S"S5 [S#S$5 [S%S&5 [S'S(5 [S)S*5 [S+S,5 [S-S.5 [S/S05 [S1S25 [S3S45 [S5S65 [S7S85 [S9S:5 [S;S<5 [S=S>5 [S?S>5 [S@S25 [SAS25 [SBS25 [SCS25 [SDS:5 [SES:5 [SFS:5 [SGSH5 [SISJ5 [SKSL5 [SMSN5 SOH!nSPHn[SQU<SRU<SS3U5 M M# [STSU5 [SVSU5 [SWSU5 [SXSY5 [SZS[5 [S\S]5 [S^S_5 [S`Sa5 [SbSc5 [SdSU5 [SeSf5 [SgSh5 [SiSj5 [SkSl5 [SmSh5 [SnSo5 [SpSq5 [SrSs5 g)tNzntpath.join("")rizntpath.join("", "", "")zntpath.join("a")�azntpath.join("/a")z/azntpath.join("\a")r�zntpath.join("a:")za:zntpath.join("a:", "\b")za:\bzntpath.join("a", "\b")z\bzntpath.join("a", "b", "c")za\b\czntpath.join("a\", "b", "c")zntpath.join("a", "b\", "c")zntpath.join("a", "b", "c\")za\b\c\zntpath.join("a", "b", "\c")z\czntpath.join("d:\", "\pleep")zd:\pleepzntpath.join("d:\", "a", "b")zd:\a\bzntpath.join('', 'a')z ntpath.join('', '', '', '', 'a')zntpath.join('a', '')za\z ntpath.join('a', '', '', '', '')zntpath.join('a\', '')z!ntpath.join('a\', '', '', '', '')zntpath.join('a/', '')za/zntpath.join('a/b', 'x/y')za/b\x/yzntpath.join('/a/b', 'x/y')z/a/b\x/yzntpath.join('/a/b/', 'x/y')z/a/b/x/yzntpath.join('c:', 'x/y')zc:x/yzntpath.join('c:a/b', 'x/y')z	c:a/b\x/yzntpath.join('c:a/b/', 'x/y')z	c:a/b/x/yzntpath.join('c:/', 'x/y')zc:/x/yzntpath.join('c:/a/b', 'x/y')z
c:/a/b\x/yzntpath.join('c:/a/b/', 'x/y')z
c:/a/b/x/yz&ntpath.join('//computer/share', 'x/y')z//computer/share\x/yz'ntpath.join('//computer/share/', 'x/y')z//computer/share/x/yz*ntpath.join('//computer/share/a/b', 'x/y')z//computer/share/a/b\x/yzntpath.join('a/b', '/x/y')z/x/yzntpath.join('/a/b', '/x/y')zntpath.join('c:', '/x/y')zntpath.join('c:a/b', '/x/y')zntpath.join('c:/', '/x/y')zntpath.join('c:/a/b', '/x/y')z'ntpath.join('//computer/share', '/x/y')z(ntpath.join('//computer/share/', '/x/y')z)ntpath.join('//computer/share/a', '/x/y')zntpath.join('c:', 'C:x/y')zC:x/yzntpath.join('c:a/b', 'C:x/y')z	C:a/b\x/yzntpath.join('c:/', 'C:x/y')zC:/x/yzntpath.join('c:/a/b', 'C:x/y')z
C:/a/b\x/y)
riza/bz/a/bruzc:a/br�zc:/a/bz//computer/sharez//computer/share/z//computer/share/a/b)zd:zd:x/yzd:/zd:/x/yz//machine/commonz//machine/common/z//machine/common/x/yzntpath.join(z, �)z*ntpath.join('\\computer\share\', 'a', 'b')z\\computer\share\a\bz)ntpath.join('\\computer\share', 'a', 'b')z&ntpath.join('\\computer\share', 'a\b')z*ntpath.join('//computer/share/', 'a', 'b')z//computer/share/a\bz)ntpath.join('//computer/share', 'a', 'b')z//computer/share\a\bz&ntpath.join('//computer/share', 'a/b')z//computer/share\a/bzntpath.join('\\', 'computer')z
\\computerz#ntpath.join('\\computer\', 'share')z\\computer\sharez%ntpath.join('\\computer\share\', 'a')z\\computer\share\az'ntpath.join('\\computer\share\a\', 'b')zntpath.join('a', 'Z:b', 'c')zZ:b\czntpath.join('a', 'Z:\b', 'c')zZ:\b\czntpath.join('a', '\\b\c', 'd')z\\b\c\dzntpath.join('a', '\b', 'c')z\b\czntpath.join('Z:/a', '/b', 'c')z"ntpath.join('//?/Z:/a', '/b', 'c')z
\\?\Z:\b\czntpath.join('D:a', './c:b')z	D:a\.\c:bzntpath.join('D:/a', './c:b')z
D:\a\.\c:brk)rS�x�ys   r�	test_join�TestNtpath.test_join3s
��� �"�%��(�"�-��!�3�'��"�D�)��#�U�+��"�D�)��)�7�3��(�%�0��+�Y�7��-�y�9��-�y�9��-�{�;��-�u�5��/��=��.�
�;��%�s�+��1�3�7��%�u�-��1�5�9��'��/��3�U�;��&��-��*�J�7��+�[�9��,�j�9��)�7�3��,�l�;��-�{�;��*�H�5��-�}�=��.��=��7�9P�Q��8�:P�Q��;�=X�Y��+�V�4��,�f�5��*�H�5��-�x�8��+�X�6��.��9��8�:P�Q��9�;Q�R��:�<R�S��+�W�5��.��=��,�h�7��/��?�S�A�W����1�5�q�9�W�S�	�?�A\�]��=�?Z�[��;�=X�Y��;�=T�U��:�<T�U��7�9P�Q��0�.�A��7�9N�O��:�<T�U��=�?Z�[��-�x�8��/��<��2�M�B��-�x�8��/��<��3�6G�H��,�m�<��-��?rc��[RnURU"S5S5 URU"S5S5 URU"S5S5 URU"S5S5 URU"S5S5 [RS	:XaS
OSnURU"S5U5 [RS	:Xd[R
"5S
:XaiURU"SR
55SR
55 URU"SR
55UR
55 gg)Nrir�ABC�abc�ABCsabcuÄŁΨuäłψr�uωΩuωωuΩΩzutf-8)r#r$rRr�r��getfilesystemencodingr>)rSr$�expecteds   r�
test_normcase�TestNtpath.test_normcase�s���?�?������"��r�*�����#���,�����%��%�0�����&�)�6�2�����"4�5�7I�J�%(�\�\�W�%<�>�.������.�1�8�<��<�<�7�"�c�&?�&?�&A�W�&L����X�&8�&?�&?�&A�B�/�6�6�8�
:����X�n�&;�&;�&=�>�%�_�_�.�
0�'Mrc�Z�[RnURU"S5S5 URU"S5S5 URU"S5S5 [RS:Xa?S[[
SS55-nURU"U5UR55 gg)Nzabcdefsabcdef��r�r���)r#r$rRr�r�r,�range�lower)rSr$rs   r�test_normcase_invalid_paths�&TestNtpath.test_normcase_invalid_paths�s����?�?������,�/��>�����-�0�-�@�����(�+�X�6��<�<�7�"��E�%��S�/�2�2�D����X�d�^�T�Z�Z�\�:�#rc���[SS5 [SS5 [SS5 [SS5 [SS5 [S	S
5 [SS5 [S
S5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [S S!5 [S"S#5 [S$S%5 [S&S'5 [S(S)5 [S*S+5 [S,S-5 [S.S/5 [S0S15 [S2S35 [S4S55 [S6S75 [S8S95 [S:S;5 [S<S;5 [S=S;5 [S>S;5 [S?S@5 [SASB5 [SCSD5 [SESF5 [SGSH5 g)INz$ntpath.normpath('A//////././//.//B')zA\Bzntpath.normpath('A/./B')zntpath.normpath('A/foo/../B')zntpath.normpath('C:A//B')zC:A\Bzntpath.normpath('D:A/./B')zD:A\Bzntpath.normpath('e:A/foo/../B')ze:A\Bzntpath.normpath('C:///A//B')zC:\A\Bzntpath.normpath('D:///A/./B')zD:\A\Bz"ntpath.normpath('e:///A/foo/../B')ze:\A\Bzntpath.normpath('..')�..zntpath.normpath('.')�.zntpath.normpath('c:.')ruzntpath.normpath('')zntpath.normpath('/')r3zntpath.normpath('c:/')r�zntpath.normpath('/../.././..')zntpath.normpath('c:/../../..')zntpath.normpath('/./a/b')�\a\bzntpath.normpath('c:/./a/b')zc:\a\bzntpath.normpath('../.././..')�..\..\..zntpath.normpath('K:../.././..')z
K:..\..\..zntpath.normpath('./a/b')�a\bzntpath.normpath('c:./a/b')zc:a\bzntpath.normpath('C:////a/b')zC:\a\bz'ntpath.normpath('//machine/share//a/b')z\\machine\share\a\bzntpath.normpath('\\.\NUL')�\\.\NULzntpath.normpath('\\?\D:/XY\Z')z\\?\D:/XY\Zz1ntpath.normpath('handbook/../../Tests/image.png')z..\Tests\image.pngz4ntpath.normpath('handbook/../../../Tests/image.png')z..\..\Tests\image.pngz.ntpath.normpath('handbook///../a/.././../b/c')z..\b\cz/ntpath.normpath('handbook/a/../..///../../b/c')z	..\..\b\cz$ntpath.normpath('//server/share/..')�\\server\share\z%ntpath.normpath('//server/share/../')z'ntpath.normpath('//server/share/../..')z(ntpath.normpath('//server/share/../../')zntpath.normpath('\\foo\\')z\\foo\\zntpath.normpath('\\foo\')z\\foo\zntpath.normpath('\\foo')z\\foozntpath.normpath('\\')r4z*ntpath.normpath('//?/UNC/server/share/..')z\\?\UNC\server\share\rkrls r�
test_normpath�TestNtpath.test_normpath�s����5�v�>��)�6�2��.��7��*�H�5��+�X�6��0�(�;��-�y�9��.�	�:��3�Y�?��&��.��%�t�,��'��.��$�d�+��%�t�,��'��0��/��6��/��8��*�G�4��,�i�8��.��<��0�-�@��)�6�2��+�X�6��-�y�9��8�:P�Q��.�
�;��3�^�D��B�DY�Z��E�G_�`��?��K��@�,�O��5�;P�Q��6�;P�Q��8�;P�Q��9�;P�Q�	�/��?��-�{�;��+�Y�7��(�&�1��;�=Z�[rc�*�[RnURU"S5S5 URU"S5S5 URU"S5S5 URU"S5S5 URU"S5S5 URU"S5S	5 [RS
:Xa/UR[US5 UR[US5 gURU"S5S5 URU"S5S
5 g)Nzfoosfoozfoo\..\barr�sfoo\..\barsbarr�u
�\..\foorgr���s�\..\foosfoo)r#�normpathrRr�r�r�r�)rSr�s  r�test_normpath_invalid_paths�&TestNtpath.test_normpath_invalid_paths�s����?�?������)�,�i�8�����*�-�z�:�����"4�5�u�=�����"5�6��?�����(�+�X�6�����"3�4�e�<��<�<�7�"����0�(�G�D����0�(�<L�M����X�g�.��8����X�&6�7��@rc���[R"[R"55n[	SU5 [	SU5 [	SU5 [	SU5 [	SU5 g)Nzntpath.realpath('.')zntpath.realpath('./.')z&ntpath.realpath('/'.join(['.'] * 100))zntpath.realpath('.\.')z&ntpath.realpath('\'.join(['.'] * 100))�r#r�r%�getcwdrG�rSr�s  r�test_realpath_curdir�TestNtpath.test_realpath_curdir�sM���?�?�2�9�9�;�/���%�x�0��'��2��7��B��(�(�3��8�(�Crc���[R"[R"55n[	SU5 [	SU5 [	SU5 [	SU5 [	SU5 g)Nz!ntpath.realpath('.', strict=True)z#ntpath.realpath('./.', strict=True)z3ntpath.realpath('/'.join(['.'] * 100), strict=True)z#ntpath.realpath('.\.', strict=True)z3ntpath.realpath('\'.join(['.'] * 100), strict=True)r�r�s  r�test_realpath_curdir_strict�&TestNtpath.test_realpath_curdir_strict�sM���?�?�2�9�9�;�/���2�H�=��4�h�?��D�h�O��5�x�@��E�x�Prc���[R"[R"55n[	SU5 [	SU5 [	SU5 [	SU5 [	SU5 g)Nz*ntpath.realpath('.', strict=ALLOW_MISSING)z,ntpath.realpath('./.', strict=ALLOW_MISSING)z<ntpath.realpath('/'.join(['.'] * 100), strict=ALLOW_MISSING)z,ntpath.realpath('.\.', strict=ALLOW_MISSING)z<ntpath.realpath('\'.join(['.'] * 100), strict=ALLOW_MISSING)r�r�s  r�test_realpath_curdir_missing_ok�*TestNtpath.test_realpath_curdir_missing_ok�s\���?�?�2�9�9�;�/���;��	��=��	��M��	��>��	��N��	rc��[R"[R"55n[	S[R
"U55 [	S[R
"[R
"U555 [	S[R"U5SS-5 [	S[R
"[R
"U555 [	S[R"U5SS-5 g)Nzntpath.realpath('..')zntpath.realpath('../..')z&ntpath.realpath('/'.join(['..'] * 50))rr3zntpath.realpath('..\..')z&ntpath.realpath('\'.join(['..'] * 50))�r#r�r%r�rG�dirnamer�r�s  r�test_realpath_pardir�TestNtpath.test_realpath_pardir�s����?�?�2�9�9�;�/���&����x�(@�A��)��~�~�f�n�n�X�6�7�	9��7�� � ��*�1�-��4�	6��*��~�~�f�n�n�X�6�7�	9��8�� � ��*�1�-��4�	6rc��[R"[R"55n[	S[R
"U55 [	S[R
"[R
"U555 [	S[R"U5SS-5 [	S[R
"[R
"U555 [	S[R"U5SS-5 g)Nz"ntpath.realpath('..', strict=True)z%ntpath.realpath('../..', strict=True)z3ntpath.realpath('/'.join(['..'] * 50), strict=True)rr3z%ntpath.realpath('..\..', strict=True)z3ntpath.realpath('\'.join(['..'] * 50), strict=True)r�r�s  r�test_realpath_pardir_strict�&TestNtpath.test_realpath_pardir_stricts����?�?�2�9�9�;�/���3�V�^�^�H�5M�N��6��~�~�f�n�n�X�6�7�	9��D�� � ��*�1�-��4�	6��7��~�~�f�n�n�X�6�7�	9��E�� � ��*�1�-��4�	6rc��[R"[R"55n[	S[R
"U55 [	S[R
"[R
"U555 [	S[R"U5SS-5 [	S[R
"[R
"U555 [	S[R"U5SS-5 g)Nz+ntpath.realpath('..', strict=ALLOW_MISSING)z.ntpath.realpath('../..', strict=ALLOW_MISSING)z<ntpath.realpath('/'.join(['..'] * 50), strict=ALLOW_MISSING)rr3z.ntpath.realpath('..\..', strict=ALLOW_MISSING)z<ntpath.realpath('\'.join(['..'] * 50), strict=ALLOW_MISSING)r�r�s  r�test_realpath_pardir_missing_ok�*TestNtpath.test_realpath_pardir_missing_oks����?�?�2�9�9�;�/���<��~�~�h�'�	)��?��~�~�f�n�n�X�6�7�	9��M�� � ��*�1�-��4�	6��@��~�~�f�n�n�X�6�7�	9��N�� � ��*�1�-��4�	6rzneed _getfinalpathname�strictTc�x�[R"[R5n[	US5R5 UR
[RU5 UR
[RUS-5 [R"X"S-5 UR[R"US-40UD6U5 UR[R"[R"US-540UD6[R"U55 [RVs1sHo3S3iM	 sn[[R "55-
nUR#5R%5nUR'[R"USS9U5 U(aGUR)[*5 [R"[RS-40UD6 SSS5 gUR'US-[R"[RS-40UD65 gs snf!,(df   g=f)N�wb�1z:\F�r�zspam)r#�abspathr�TESTFN�open�close�
addCleanup�unlinkr%�symlinkrV�realpathr<�string�ascii_uppercase�set�
listdrives�popr>rRr�r)rSrI�ABSTFN�c�drives�ds      r�test_realpath_basic�TestNtpath.test_realpath_basics������	� 0� 0�1���V�T�� � �"����	�(�(�&�1����	�(�(�&�3�,�7�
�
�
�6�C�<�(����V�_�_�V�c�\�D�V�D�f�M����V�_�_�R�[�[��#��-F�Q�&�Q����V�,�	.�
&,�%;�%;�<�%;��C�s�)�%;�<�s�2�=�=�?�?S�S���J�J�L���!���������5�9�1�=���"�"�7�+����	� 0� 0�8� ;�*�"(�*�,�+�
���V�h�.� &���	�0@�0@�8�0K� V�v� V�
X��=�,�+�s�)H&�8)H+�+
H9c�V�[R"[R5n[R
"US-U5 UR
[RU5 UR[[RUSS9 UR[[RUS-SS9 g)Nr�Tr��2)r#r�rr�r%rr�rr��FileNotFoundErrorr�rSrs  r�test_realpath_strict�TestNtpath.test_realpath_strict:s{��
���	� 0� 0�1��
�
�
�6�C�<��(����	�(�(�&�1����+�V�_�_�f�T��R����+�V�_�_�f�s�l�SW��Xrc�L�[Rn[R"[R5n[
R"U5nUS-nURU"USS9U5 UR[XSS9 UR[X[S9 US-nURU"USS9U5 UR[XSS9 UR[X[S9 US-nURU"USS9U5 UR[XSS9 UR[X[S9 US-nURU"USS9U5 UR[XSS9 UR[X[S9 US-nURU"USS9[
R"55 URU"USS9[
R"55 URU"U[S9[
R"55 US	-nURU"USS9[
R"55 URU"USS9[
R"55 URU"U[S9[
R"55 US
-nURU"USS9US-5 UR[XSS9 URU"U[S9US-5 US-nURU"USS9US
-5 UR[XSS9 URU"U[S9US
-5 g)N�Fr�T�z\nonexistent\xs\nonexistent\xz\..s\..z\nonexistent\x\..z\nonexistents\nonexistent\x\..s\nonexistent)
r#rr�rr�r%r<rRr�rrr��getcwdb)rSrr�ABSTFNbrs     r�test_realpath_invalid_paths�&TestNtpath.test_realpath_invalid_pathsEs����?�?�����	� 0� 0�1���+�+�f�%����������$�u�5�t�<����'�8�$��?����'�8�-��H��� ������$�u�5�t�<����'�8�$��?����'�8�-��H��.�.������$�u�5�t�<����'�8�$��?����'�8�-��H��0�0������$�u�5�t�<����'�8�$��?����'�8�-��H��
�"������$�u�5�r�y�y�{�C�����$�t�4�b�i�i�k�B�����$�}�=�r�y�y�{�K���$������$�u�5�r�z�z�|�D�����$�t�4�b�j�j�l�C�����$�}�=�r�z�z�|�L��2�2������$�u�5�v��7O�P����'�8�$��?�����$�}�=�v��?W�X��4�4������$�u�5�w�AQ�7Q�R����'�8�$��?�����$�}�=�w�IY�?Y�Zrc�@�[Rn[R"[R5n[
R"U5nUS-nUR"[X%40UD6 UR"[X%40UD6 US-nUR"[X%40UD6 UR"[X%40UD6 US-nUR"[X%40UD6 UR"[X%40UD6 US-nUR"[X%40UD6 UR"[X%40UD6 g)Nr�s\nonexistent\�s�\..s\nonexistent\�\..)	r#rr�rr�r%r<r�r�)rSrIrrrrs      r�#test_realpath_invalid_unicode_paths�.TestNtpath.test_realpath_invalid_unicode_pathsms	���?�?�����	� 0� 0�1���+�+�f�%���� �����,�h�G��G����,�h�G��G��/�/�����,�h�G��G����,�h�G��G���$�����,�h�G��G����,�h�G��G��3�3�����,�h�G��G����,�h�G��Grc��[R"[R5n[	US5R5 UR
[RU5 UR
[RUS-5 [R"U[R"US-55 UR[R"US-40UD6U5 g)Nr�r�)
r#r�rr�r�r�r�rr%r�relpathrVr)rSrIrs   r�test_realpath_relative�!TestNtpath.test_realpath_relative�s������	� 0� 0�1���V�T�� � �"����	�(�(�&�1����	�(�(�&�3�,�7�
�
�
�6�6�>�>�&�3�,�7�8����V�_�_�V�c�\�D�V�D�f�Mrc�	�[R"[R5n[R
"U5 UR
[RU5 [R"U5 [R
"S5 [R"S5 [R"SS5 [R"SS5 [R"S5 [R"SS5 [R"SS5 [R"S	S
5 [R"SS5 [R"S
S5 [R"US-S5 [R"SS5 UR[R"S5US-5 UR[R"S5US-5 UR[R"S
5US-5 UR[R"S5US-5 UR[R"S5US-5 UR[R"S5US-5 UR[R"S5US-5 UR[R"S5US-5 UR[R"S5[R"US-55 UR[R"S5[R"US-55 UR[R"S5[R"US-55 UR[R"S5[R"US-55 UR[R"S5[R"US-55 UR[R"S 5[R"US-55 UR[R"S!5[R"US-55 UR[R"S"5[R"US-55 SSS5 g!,(df   g=f)#N�subdirr��	recursiver��parentrS�missing�brokenz
broken\bar�broken1zself\self\broken�broken2z"subdir\parent\subdir\parent\broken�broken3z\broken�broken4zrecursive\..\broken�broken5z\missingz
broken\fooz\missing\fooz\broken\barzbroken1\bazz\broken\bar\bazz\self\self\missingz$\subdir\parent\subdir\parent\missingsbrokens
broken\foosbroken1sbroken1\bazsbroken2sbroken3sbroken4sbroken5)r#r�rr�r%�mkdirr��rmtree�
change_cwd�chdirrrVrr<rs  r�test_realpath_broken_symlinks�(TestNtpath.test_realpath_broken_symlinks�sh�����	� 0� 0�1��
��������	�(�(�&�1�
�
!�
!�&�
)��H�H�X���H�H�X���J�J�s�K�(��J�J�t�X�&��H�H�T�N��J�J�s�F�#��J�J�y�(�+��J�J�}�i�0��J�J�*�I�6��J�J�<�i�H��J�J�v�
�*�I�6��J�J�-�y�9�� � �����!:�!'�+�!5�
7�� � �����!?�!'�/�!9�
;�
� � �����!<�!'�.�!8�
:�� � �����!@�!'�*<�!<�
>�� � �����!;�!'�*?�!?�
A�� � �����!;�!'�*Q�!Q�
S�� � �����!;�!'�+�!5�
7�� � �����!;�!'�+�!5�
7�
� � �����!;�!#���V�k�-A�!B�
D�� � �����!@�!#���V�o�-E�!F�
H�� � �����!=�!#���V�n�-D�!E�
G�� � �����!A�!#���V�6H�-H�!I�
K�� � �����!<�!#���V�6K�-K�!L�
N�� � �����!=�!#���V�6]�-]�!^�
`�� � �����!<�!#���V�k�-A�!B�
D�� � �����!<�!#���V�k�-A�!B�
D�_*�
)�
)�s
�1QR?�?
S
c�~�[R"[R5nUR	[R
U5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 [R"X5 UR[R"U5U5 [R"US-US-5 [R"US-US-5 US-US-4nUR[R"US-5U5 UR[R"US-5U5 UR[R"US-5SU55 UR[R"US-5[R"U55 UR[R"US	-5[R"U5S
-5 [R"US-US-5 UR[R"US-[R"U5-S-5US-5 UR[R"US-[R"U5-S-5U5 [R"[R"U5S
-US-5 UR[R"US-5US-5 [R"S[R"[R"U55-S-[R"U5-S-US-5 UR[R"US-5US-5 UR[R"[R"U55U5 g)Nr�rr�r	r��1\xc3�P# �UHn[R"US5v� M g7f)r�N)r#�join)r'�rs  rr)�9TestNtpath.test_realpath_symlink_loops.<locals>.<genexpr>�s���A��1�6�;�;�q�#�.�.��s�$&�1\..�1\..\x�\xr��1\..\r��..\r3)
r#r�rr�r�rr%rrVrr[r��basename)rSrr�s   r�test_realpath_symlink_loops�&TestNtpath.test_realpath_symlink_loops�s0�����	� 0� 0�1�����	�(�(�&�1����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7�
�
�
�6�"����V�_�_�V�4�f�=�
�
�
�6�C�<��#��.�
�
�
�6�C�<��#��.��S�L�&�3�,�/�����&�/�/�&�3�,�7��B����&�/�/�&�3�,�7��B����&�/�/�&�6�/�:�A��A�	C����V�_�_�V�g�-=�>�#�^�^�F�3�	5����V�_�_�V�j�-@�A�#�^�^�F�3�e�;�	=�
�
�
�6�C�<��#��.����V�_�_�V�i�-?�/5���v�/F�.G�IL�.M�N�#�c�\�	+�	
���&�/�/�&�9�*<�,2�O�O�F�,C�+D�FI�+J�K�"�	$�	�
�
�6�?�?�6�*�V�3�V�c�\�B����V�_�_�V�c�\�:�F�S�L�I�
�
�
�6�F�O�O�F�N�N�6�,B�C�C���"�O�O�F�3�4�69�:�;A�C�<�	I����V�_�_�V�c�\�:�F�S�L�I�	
���V�_�_�V�_�_�V�-D�E�v�Nrc���[R"[R5nUR	[R
U5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 [R"X5 UR[[RUSS9 [R"US-US-5 [R"US-US-5 UR[[RUS-SS9 UR[[RUS-SS9 UR[[RUS-SS9 UR[R"US	-SS9[R"U55 UR[[RUS
-SS9 [R"US-US-5 UR[[RUS-[R"U5-S-SS9 UR[[RUS-[R"U5-S-SS9 [R"[R"U5S
-US-5 UR[[RUS-SS9 [R"S[R"[R"U55-S-[R"U5-S-US-5 UR[[RUS-SS9 UR[[R[R"U5SS9 g)Nr�rr�r	r�Tr�r4r9r:r�r<r�r=r3)r#r�rr�r�rr%rr�rrrVr�r>rs  r�"test_realpath_symlink_loops_strict�-TestNtpath.test_realpath_symlink_loops_strict�s
�����	� 0� 0�1�����	�(�(�&�1����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7�
�
�
�6�"����'�6�?�?�F�4��H�
�
�
�6�C�<��#��.�
�
�
�6�C�<��#��.����'�6�?�?�F�S�L���N����'�6�?�?�F�S�L���N����'�6�?�?�F�V�O�D��Q�	
���V�_�_�V�g�-=�d�K�#�^�^�F�3�	5����'�6�?�?�F�Z�4G�PT��U�
�
�
�6�C�<��#��.����'�6�?�?�F�Y�4F�/5���v�/F�5G�IL�5M�48�	�	:�	
���'�6�?�?� �9�,�v���v�/F�F��L�!%�	�	'�	�
�
�6�?�?�6�*�V�3�V�c�\�B����'�6�?�?�F�S�L���N�
�
�
�6�F�O�O�F�N�N�6�,B�C�C���"�O�O�F�3�4�69�:�;A�C�<�	I����'�6�?�?�F�S�L���N�	
���'�6�?�?�F�O�O�F�4K�!%�	�	'rc��[R"[R5nUR	[R
U5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 UR	[R
US-5 [R"X5 UR[[RU[S9 [R"US-US-5 [R"US-US-5 UR[[RUS-[S9 UR[[RUS-[S9 UR[[RUS-[S9 UR[R"US	-5[R"U55 UR[R"US
-5[R"U5S-5 [R"US-US-5 UR[R"US-[R"U5-S-5US-5 UR[[RUS-[R"U5-S-[S9 [R"[R"U5S
-US-5 UR[[RUS-[S9 [R"S[R"[R"U55-S-[R"U5-S-US-5 UR[[RUS-[S9 UR[[R[R"U5[S9 g)Nr�rr�r	r�r�r�r4r9r:r;r<r�r=r3)r#r�rr�r�rr%rr�rrrrVr�r>rs  r�!test_realpath_symlink_loops_raise�,TestNtpath.test_realpath_symlink_loops_raise sR�����	� 0� 0�1�����	�(�(�&�1����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7����	�(�(�&�3�,�7�
�
�
�6�"����'�6�?�?�F�=��Q�
�
�
�6�C�<��#��.�
�
�
�6�C�<��#��.����'�6�?�?�F�S�L�#0�	�	2����'�6�?�?�F�S�L�#0�	�	2����'�6�?�?�F�V�O�#0�	�	2�
	
���V�_�_�V�g�-=�>�#�^�^�F�3�	5����V�_�_�V�j�-@�A�#�^�^�F�3�e�;�	=�	�
�
�6�C�<��#��.����V�_�_�V�i�-?�/5���v�/F�.G�IL�.M�N�#�c�\�	+�	
����V�_�_��Y������!8�8�3�>� �	�	"�
	�
�
�6�?�?�6�*�V�3�V�c�\�B����'�6�?�?�F�S�L�#0�	�	2�	�
�
�6�F�O�O�F�N�N�6�,B�C�C�������0�1�36�7�8>���	F����'�6�?�?�F�S�L�#0�	�	2�	
���'�6�?�?�F�O�O�F�4K�#0�	�	2rc���[R"[R5nUR	[R
US-5 UR	[R
SU-S-5 UR	[R
US-5 UR	[R
US-5 [
US-S5nURS5 SSS5 [R"US-US-5 [
SU-S-S5nURS5 SSS5 [R"SU-S-US-5 UR[R"US-40UD6US-5 UR[R"US-40UD6SU-S-5 [
[R"US-5S	5nURUR5S5 SSS5 [
[R"US-5S	5nURUR5S5 SSS5 UR[R"SU-S-40UD6SU-S-5 UR[R"SU-S-40UD6SU-S-5 g!,(df   GN�=f!,(df   GN�=f!,(df   N�=f!,(df   N�=f)
N�3z\\?\z3.�3linkz3.linkr��0�1�rb)r#r�rr�r�rr��writer%rrVrrR�read)rSrIr�fs    r�test_realpath_symlink_prefix�'TestNtpath.test_realpath_symlink_prefixVsN�����	� 0� 0�1�����	�(�(�&�3�,�7����	�(�(�)�f�*<�t�*C�D����	�(�(�&�7�*:�;����	�(�(�&�8�*;�<�
�&�3�,��
%��
�G�G�D�M�&�
�
�
�6�C�<��'�!1�2�
�)�f�$�t�+�T�
2�a�
�G�G�D�M�3�
�
�
�9�v�%��,�f�x�.?�@����V�_�_�V�g�-=�H��H�#�c�\�	+����V�_�_�V�h�->�I�&�I�&��/�$�6�	8��&�/�/�&�7�"2�3�T�
:�a����Q�V�V�X�t�,�;�
�&�/�/�&�8�"3�4�d�
;�q����Q�V�V�X�t�,�<�	
���V�_�_�Y��-?�'�-I�T�V�T�&��/�#�5�	7����V�_�_�Y��-?�(�-J�U�f�U�&��/�$�6�	8�-&�
%��3�
2��;�
:��
;�
;�s0�J"�J4�!K�!K�"
J1�4
K�
K�
K%c�d�[SS5 [SS5 [SS5 [SS5 g)Nzntpath.realpath('NUL')r�z$ntpath.realpath('NUL', strict=False)z#ntpath.realpath('NUL', strict=True)z,ntpath.realpath('NUL', strict=ALLOW_MISSING)rkrls r�test_realpath_nul�TestNtpath.test_realpath_nulys.���'��4��5�z�B��4�j�A��=�z�Jrzneed _getshortpathnamec�<�[R"[R5n[R"U5 [R
"U5 [R"U5 UR[R
U5 [R"US5n[R"U5 [U5n[R"US5n[R"US5n[US5nURS5 SSS5 URU[R"U55 0SS0S[04H�nUR "S0UD6 [R""U5 URU[R"S0UD65 SSS5 [R""UR%55 URU[R"S0UD65 SSS5 [R""U5 URU[R"S0UD65 SSS5 SSS5 M� g!,(df   GNB=f!,(df   N�=f!,(df   N�=f!,(df   NO=f!,(df   GMU=f)	N�MyVeryLongDirectoryName�file.txtr��contentr�Tr])rW)r#r�rr�rr.r%r-r�r6rr�rMrVrr�subTestr/r�)rSr�
test_dir_long�test_dir_short�test_file_long�test_file_shortrOrIs        r�test_realpath_cwd�TestNtpath.test_realpath_cwd�s������	� 0� 0�1������ ����� �
��������	�(�(�&�1����F�,E�F�
�
�����*�=�9�����]�J�?�� �+�+�n�j�A��
�.�$�
'�1�
�G�G�J��(�	
���^�V�_�_�_�-M�N��8�T�*�X�}�,E�E�F����'��'��)�)�-�8��(�(�&����=�f�=�?�9��)�)�-�*=�*=�*?�@��(�(�&����=�f�=�?�A��)�)�.�9��(�(�&����=�f�=�?�:�(�'�F�(�
'��9�8��A�@��:�9��(�'�s`�9I�J�2'I�,J�'I)�,J�
'I:�1J�
I�
I&�"J�)
I7�3J�:
J�J�
J	c��[R"[R5n[R"U5 [R
"U5 [R"U5 UR[R
U5 [R"US5n[R"US5n[US5nURS5 SSS5 [R"SSSUS/[RS9nUR(a[ R""S	5eUR%U[R"U55 [R"SUSS
/[RS9nUR(a[ R""S5eUR%U[R"U55 g!,(df   N�=f![&a [ R""S
5ef=f)NzLongFileName123.txtzLONGFI~1.TXTr�rXz
fsutil.exe�file�setShortName)�
creationflagszfailed to set short namez8the filesystem seems to lack support for short filenamesz
icacls.exez/denyz*S-1-5-32-545:(S)z&failed to deny access to the test file)r#rrr�rr.r%r-r�r6r�rM�
subprocess�run�DETACHED_PROCESS�
returncode�unittest�SkipTestrV�AssertionError)rSr�	test_filer]rOr(s      r�test_realpath_permission�#TestNtpath.test_realpath_permission�sz������!1�!1�2������ ����� �
��������	�(�(�&�1��K�K��(=�>�	� �+�+�f�n�=��
�)�T�
"�a�
�G�G�J��#�

�N�N�
�6�>�9�n�M�$�5�5�
��
�<�<��#�#�$>�?�?�	`�� � ��F�O�O�O�,L�M�
�N�N�
�9�g�/B�C�$�5�5�
��

�<�<��#�#�$L�M�M����Y�����(H�I�;#�
"�� �	`��#�#�$^�_�_�	`�s�G�+&G�
G�!G8c�h�[R"5nUR5 SUS'SUS'SUS'[SS5 [SS	5 [S
S5 [SS
5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS	5 [SS5 [SS5 [SS5 [S S!5 [S"S#5 [S$S%5 [S&S'5 SSS5 g!,(df   g=f)(Nr�rg�baz1z{foo�baz2z{foo}zntpath.expandvars("foo")zntpath.expandvars("$foo bar")zbar barzntpath.expandvars("${foo}bar")�barbarzntpath.expandvars("$[foo]bar")z	$[foo]barzntpath.expandvars("$bar bar")z$bar barzntpath.expandvars("$?bar")z$?barzntpath.expandvars("$foo}bar")zbar}barzntpath.expandvars("${foo")z${foozntpath.expandvars("${{foo}}")zbaz1}zntpath.expandvars("$foo$foo")zntpath.expandvars("$bar$bar")z$bar$barzntpath.expandvars("%foo% bar")zntpath.expandvars("%foo%bar")zntpath.expandvars("%foo%%foo%")z$ntpath.expandvars("%%foo%%foo%foo%")z%foo%foobarzntpath.expandvars("%?bar%")z%?bar%zntpath.expandvars("%foo%%bar")zbar%barz ntpath.expandvars("'%foo%'%bar")z'%foo%'%barzntpath.expandvars("bar'%foo%")z	bar'%foo%)r�EnvironmentVarGuard�clearrG�rS�envs  r�test_expandvars�TestNtpath.test_expandvars�s��
�
*�
*�
,���I�I�K��C��J� �C��K�!�C��L��-�u�5��2�I�>��3�X�>��3�[�A��2�J�?��/��9��2�I�>��/��9��2�G�<��2�H�=��2�J�?��3�Y�?��2�H�=��4�h�?��9�=�I��0�(�;��3�Y�?��7��I��4�l�C�/-�
,�
,�s�DD#�#
D1zneed os_helper.FS_NONASCIIc��Sn[R"5nUR5 [RnX2S'SU-X#'U"SSU-5 U"SU-SU-5 U"SSU-5 U"S	U-S
U-5 U"SSU-5 U"S
U-S
U-5 U"SSU-5 U"SR	U5SU-5 U"SSU-5 U"SR	U5S
U-5 SSS5 g!,(df   g=f)Nc�"�[SU-U5 g)Nzntpath.expandvars(%r)rk)�valuer�s  r�check�2TestNtpath.test_expandvars_nonascii.<locals>.check�s���*�U�2�H�=rr��hamz	$spam barz%s barz$%s barz
${spam}barz%sbarz${%s}barzham%sbarz	$spam}barz%s}barz$%s}barz
%spam% barz%{}% barz	ham%s barz	%spam%barz%{}%bar)rrrrs�FS_NONASCIIr)rSr{ru�nonasciis    r�test_expandvars_nonascii�#TestNtpath.test_expandvars_nonascii�s��	>�
�
*�
*�
,���I�I�K� �,�,�H�"��K�!�H�,�C�M��+�x�(�2�3��)�h�&�	�H�(<�=��,��(� 2�3��*�x�'��h�)>�?��+�x�(�2�3��)�h�&�	�H�(<�=��,��8� 3�4��*�#�#�H�-�{�X�/E�F��+�w��1�2��)�"�"�8�,�j�8�.C�D�-�
,�
,�s�CC-�-
C;�cpuc���[Rn[R"5nUR	5 SUS'SnURU"SU-5SU-5 URU"SU-5SU-5 URU"SU-S-5SU-S	-5 URU"SU-5S	U-5 URU"S
U-5SU-5 SSS5 g!,(df   g=f)N�B�Ai��z%A%z%A%A�BAz''z%%�%z$$�$)r#�
expandvarsrrrrsrR)rSr�ru�ns    r�test_expandvars_large� TestNtpath.test_expandvars_larges����&�&�
�
�
*�
*�
,���I�I�K��C��H��A����Z��a��0�#�a�%�8����Z��q��1�4��6�:����Z��Q���
�6��Q����E����Z��Q��/��Q��7����Z��Q��/��Q��7�-�
,�
,�s�B4C#�#
C1c���[SS5 [R"5nUR5 [SS5 SUS'SUS'S	US
'[SS5 [SS
5 US	[SS5 [SS5 UR5 S
US'S	US
'[SS5 [SS
5 [SS5 [SS5 [SS5 [SS5 UR5 SUS'S
US'S	US
'[SS5 [SS
5 UR5 S
US'SUS
'[SS5 [SS
5 SSS5 g!,(df   g=f)Nzntpath.expanduser("test")�testzntpath.expanduser("~test")z~test�C:\�	HOMEDRIVEz
Users\eric�HOMEPATH�eric�USERNAMEz
C:\Users\testzntpath.expanduser("~")z
C:\Users\ericz
Users\test�USERPROFILEz"ntpath.expanduser("~test\foo\bar")zC:\Users\test\foo\barz"ntpath.expanduser("~test/foo/bar")zC:\Users\test/foo/barzntpath.expanduser("~\foo\bar")zC:\Users\eric\foo\barzntpath.expanduser("~/foo/bar")zC:\Users\eric/foo/barzF:\�HOME�idle)rGrrrrsrts  r�test_expanduser�TestNtpath.test_expanduser
sn���*�F�3�
�
*�
*�
,���I�I�K��/��9�%�C���+�C�
�O�$�C�
�O��/�1B�C��+�->�?��K� ��/��?��+�]�;��I�I�K�!2�C�
��$�C�
�O��/�1B�C��+�->�?��9�.�
0��7�,�
.��5�.�
0��3�,�
.�
�I�I�K� �C��K�!2�C�
��$�C�
�O��/�1B�C��+�->�?�
�I�I�K�!2�C�
��$�C�
�O��/��9��+�->�?�U-�
,�
,�s�D*E�
E#zabspath requires 'nt' modulec���[SS5 [SS5 [SS5 [SS5 [S	S5 [S
S5 [SS5 [S
S5 [SS5 UR[R"[R"S555 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [S S!5 [S"S!5 [S#S!5 [S$S!5 [S%S!5 [S&S'5 [S(S)5 [S*S)5 [S+S)5 [S,S)5 [S-S)5 [S.S5 [S/S5 [S0S5 [S1S5 [S2S5 [
R"[
R5n[S3U5 [S4US5-5 [S6US7-5 [R"U5up#[S8US9-5 SSS5 g!,(df   g=f):Nzntpath.abspath("C:\")r�z-ntpath.abspath("\\?\C:////spam////eggs. . .")z\\?\C:\spam\eggsz-ntpath.abspath("\\.\C:////spam////eggs. . .")z\\.\C:\spam\eggsz#ntpath.abspath("//spam//eggs. . .")z\\spam\eggsz#ntpath.abspath("\\spam\\eggs. . .")zntpath.abspath("C:/spam. . .")zC:\spamzntpath.abspath("C:\spam. . .")zntpath.abspath("C:/nul")r�zntpath.abspath("C:\nul")zC:spamzntpath.abspath("//..")r4zntpath.abspath("//../")z\\..\zntpath.abspath("//../..")zntpath.abspath("//../../")z\\..\..\zntpath.abspath("//../../../")zntpath.abspath("//../../../..")z ntpath.abspath("//../../../../")zntpath.abspath("//server")z\\serverzntpath.abspath("//server/")z	\\server\zntpath.abspath("//server/..")zntpath.abspath("//server/../")z\\server\..\z ntpath.abspath("//server/../..")z!ntpath.abspath("//server/../../")z#ntpath.abspath("//server/../../..")z$ntpath.abspath("//server/../../../")z ntpath.abspath("//server/share")z\\server\sharez!ntpath.abspath("//server/share/")r�z#ntpath.abspath("//server/share/..")z$ntpath.abspath("//server/share/../")z&ntpath.abspath("//server/share/../..")z'ntpath.abspath("//server/share/../../")zntpath.abspath("C:\nul. . .")zntpath.abspath("//... . .")zntpath.abspath("//.. . . .")zntpath.abspath("//../... . .")zntpath.abspath("//../.. . . .")zntpath.abspath("")zntpath.abspath(" ")z\ zntpath.abspath("?")z\?zntpath.abspath("/abc/")z\abc)	rG�
assertTruer#�isabsr�r�temp_cwdr�r�)rS�cwd_dir�drive�_s    r�test_abspath�TestNtpath.test_abspath>s���'��0��A�CZ�[��A�CZ�[��4�:J�K��8�:J�K��/�*�=��0�*�=��)�L�9��*�L�9�������V�^�^�H�%=�>�?��'�6�:��(�:�>��*�:�>��+�>�B��.�>�B��0�>�B��1�>�B��+�|�D��,�~�F��.�~�F��/�7I�J��1�7I�J��2�7I�J��4�7I�J��5�7I�J��1�:M�N��2�:O�P��4�:O�P��5�:O�P��7�:O�P��8�:O�P��/��>��,�v�6��-�v�6��/�*�=��0�*�=�
�
�
�	� 0� 0�
1�W��'��1��(�'�E�/�:��(�'�E�/�:��(�(��1�H�E��,�e�g�o�>�2�
1�
1�s
�AI�
I+c�~�[Rn[RS:Xa�UR	U"S5[R
"U"S5S55 UR	U"S5[R
"U"S5S55 UR	U"S5S	5 UR	U"S
5S5 UR	U"S5S5 UR	U"S
5S
5 UR	U"S5S5 UR	U"S5S5 UR	U"S5S5 UR	U"S5S5 [RS:Xa/UR
[US5 UR
[US5 gUR	U"S5S5 UR	U"S5S5 g)Nr�zC:zC:rsC:sC:rz:spamz:\spams:spams:\spamr�r�zc:\foo\..\barzc:\barsc:\foo\..\barsc:\barr�u
c:\�\..\foor�r�sc:\�\..\foosc:\foo)r#r�r�r�rRr6r�r�)rSr�s  r�test_abspath_invalid_paths�%TestNtpath.test_abspath_invalid_pathsksh���.�.���<�<�7�"����W�X�.����G�D�M�6�0R�S����W�Y�/����W�U�^�W�1U�V����W�[�1�=�A����W�\�2�N�C������/��?������0�.�A�����!7�8�)�D�����!8�9�:�F������.��=�����!6�7��C��<�<�7�"����0�'�;�G����0�'�;O�P����W�[�1�;�?����W�%9�:�J�Grc��[SS5 [SS5 [SS5 [SS5 [R"[R5n[R
"U5n[SS	U-S
-5 [SS	U-S-5 SSS5 [S
S5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [SS5 [S S5 [S!S5 [S"S5 [S#S5 g!,(df   N�=f)$Nzntpath.relpath("a")r�z#ntpath.relpath(ntpath.abspath("a"))zntpath.relpath("a/b")r�zntpath.relpath("../a/b")z..\a\bzntpath.relpath("a", "../b")r=r�zntpath.relpath("a/b", "../c")r�zntpath.relpath("a", "b/c")z..\..\az*ntpath.relpath("c:/foo/bar/bat", "c:/x/y")z..\..\foo\bar\batz@ntpath.relpath("//conky/mountpoint/a", "//conky/mountpoint/b/c")zntpath.relpath("a", "a")r�z(ntpath.relpath("/foo/bar/bat", "/x/y/z")z..\..\..\foo\bar\batz*ntpath.relpath("/foo/bar/bat", "/foo/bar")�batz#ntpath.relpath("/foo/bar/bat", "/")zfoo\bar\batz#ntpath.relpath("/", "/foo/bar/bat")r�z$ntpath.relpath("/foo/bar/bat", "/x")z..\foo\bar\batz$ntpath.relpath("/x", "/foo/bar/bat")z
..\..\..\xzntpath.relpath("/", "/")zntpath.relpath("/a", "/a")zntpath.relpath("/a/b", "/a/b")z"ntpath.relpath("c:/foo", "C:/FOO"))rGrr�r�r#r>)rSr��
currentdirs   r�test_relpath�TestNtpath.test_relpaths*���$�c�*��4�c�:��&��/��)�:�6�
�
�
�	� 0� 0�
1�W�����1�J��0�&��2C�E�2I�J��2�F�:�4E�h�4N�O�2�	�+�[�9��;�=T�U��Q�S^�_��)�3�/��9�;V�W��;�U�C��4�o�F��4�l�C��5�7J�K��5��G��)�3�/��+�S�1��/��5��3�S�9�#2�
1�s�;E�
Ec��^�SnU4SjnTR[[RS5 TR[[R/5 TR[[R[/55 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S	5 U"S/S5 U"SS/S5 U"S
S/S5 U"S
S
/S5 U"SS/S5 U"S
S/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"SS/S5 U"S/S5 U"SS/S5 U"SS/S5 U"SS /S!5 U"S"S#/S!5 U"S$S%/S!5 U"/S&QS5 U"/S'QS!5 U"S(S)/S*5 U"S/S5 U"SS+/S5 U"SS,/S	5 TR[[RS-S/5 TR[[RS-S./5 TR[[RS/S/5 TR[[RSS0/5 TR[[RSS1/5 TR[[RSS0/5 g)2Nc�B�[SU-RSS5U5 g)Nzntpath.commonpath(%r)r4r3)rGr9)�pathsr�s  rr{�)TestNtpath.test_commonpath.<locals>.check�s"���+�e�3�<�<�V�T�J��
rc�>�TR[U[RU5 TR[U[RUSSS25 TR[U[RUVs/sHn[R
"U5PM sn5 TR[U[RUSSS2Vs/sHn[R
"U5PM sn5 gs snfs snf)N���)�assertRaisesRegex�
ValueErrorr#�
commonpathr%r<)r�r�r(rSs   �r�check_error�/TestNtpath.test_commonpath.<locals>.check_error�s�����"�"�:�x��9J�9J�E�R��"�"�:�x��9J�9J�E�RV�TV�RV�K�X��"�"�:�x��9J�9J�<A�#B�E�q�B�K�K��N�E�#B�
D��"�"�:�x��9J�9J�<A�$�B�$�K�#H�K�q�B�K�K��N�K�#H�
J��$C��#Hs�8 C1�	 C6zC:\FoozC:Fooz%Can't mix absolute and relative pathsz\FoozPaths don't have the same drive�Fooz%Can't mix rooted and not-rooted pathszC:\Foo\zC:\\FoozC:\Foo\\zC:\.\FoozC:\Foo\.r�zC:\bazzC:\Barz
C:\Foo\Bazz
C:\Foo\BarzC:\BazzC:\Bar\z
C:/Foo/Bazz
c:/foo/bazz
c:/foo/barr�zD:\FoozD:Foor��alotri�and\jam�and\spam�andzand\\jamz
and\spam\\z	and\.\jamz
.\and\spam)r�r�r�)r�r�r�z	C:and\jamz
C:and\spamzC:andz	spam\alotz
\spam\alotsC:\FoozFoo\BazsFoos
C:\Foo\BazsFoo\Baz)r��	TypeErrorr#r�r��iter)rSr{r�s`  r�test_commonpath�TestNtpath.test_commonpath�s$���	�	J�	
���)�V�%6�%6��=����*�f�&7�&7��<����*�f�&7�&7��b��B�	�Y��(�*Q�R��Y��(�*K�L��Y��&�(I�J��W�g�&�(I�J��W�e�$�&G�H��W�e�$�&M�N�
�y�k�9�%�
�y�)�$�i�0�
�{�I�&�	�2�
�{�K�(�)�4�
�{�M�*�I�6�
�|�\�*�I�6�
�v�y�!�6�*�
�y�)�$�f�-�
�y�.�)�9�5�
�~�~�.�	�:�
�y�)�$�f�-�
�{�I�&��/�
�~�|�,�i�8�
�~�|�,�i�8�
�|�^�,�i�8�	�Y�	�*�,M�N��Y��(�*K�L��W�g�&�(I�J�
�v�h���
�v�v���'�
�v�v���#�
�z�;�'��/�
�|�_�-�u�5�
�}�n�-�u�5�
�/��4�
�.��6�
�|�]�+�W�5�
�r�d�B��
�r�<� �"�%�	�R��(�*Q�R����)�V�%6�%6��^�8T�U����)�V�%6�%6��Z�8P�Q����)�V�%6�%6���8P�Q����)�V�%6�%6��O�8T�U����)�V�%6�%6��K�8P�Q����)�V�%6�%6���8P�Qrz&Emscripten cannot fstat unnamed files.c	�P�[5n[5nUR[R"UR	5UR	555 UR[R"UR	5UR	555 [RS:Xa5UR[5 [R"SS5 SSS5 SSS5 SSS5 g!,(df   N=f!,(df   N(=f!,(df   g=f)Nr�r�)
r	r�r#�sameopenfile�fileno�assertFalser�r�r�r)rS�tf1�tf2s   r�test_sameopenfile�TestNtpath.test_sameopenfile�s���
�_��]�_���O�O�F�/�/��
�
��c�j�j�l�K�L����V�0�0�����s�z�z�|�L�M��|�|�w�&��&�&�w�/��'�'��B�/�0�&5�_�_�0�/��&5�_��_�_�s;�D�B.D�C5�D�$D�5
D�?D�
D	�D�
D%c��UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S	55 UR[R"S
55 UR[R"S55 UR[R"S55 [R"5nUR[R"U55 SSS5 [RS
:XGaH[R"S5n[R"U5up4[R"U5 UR[R"UR555 UR[R"UR555 SSS5 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 gg!,(df   GNm=f!,(df   N�=f)Nr�r�r�zC:/z\\.\c:\z\\.\C:\sc:\sC:\sc:/sC:/s\\.\c:\s\\.\C:\r��
SystemRootz\\localhost\c$z\\localhost\c$\s\\localhost\c$s\\localhost\c$\)r�r#�ismountr�temp_dirr�r�r�r%�getenvr�r/r��upper)rSr�test_cwdr�rs     r�test_ismount�TestNtpath.test_ismount�s��������v�.�/�������v�.�/�������u�-�.�������u�-�.�������}�5�6�������}�5�6�������w�/�0�������w�/�0�������v�.�/�������v�.�/�������~�6�7�������~�6�7�
�
�
�
!�Q����V�^�^�A�.�/�"��<�<�7�"��y�y��.�H� �+�+�H�5�K�E��%�%�h�/�� � �������
�!>�?�� � �������
�!>�?�0�
�O�O�F�N�N�+>�?�@��O�O�F�N�N�+@�A�B��O�O�F�N�N�+?�@�A��O�O�F�N�N�+A�B�C�!#�"�
!��0�/�s�&M�A'M0�
M-�0
M>c��[RnURU"S55 [RS:XaFUR[US5 UR[US5 UR[US5 gURU"S55 URU"S55 URU"S55 g)Nr�r�zc:\sc:\r�)r#r�r�r�r�r�r�r�)rSr�s  r�test_ismount_invalid_paths�%TestNtpath.test_ismount_invalid_pathss����.�.�������.�/��<�<�7�"����j�'�:�>����j�'�;�?����0�'�;�G����W�Z�0�1����W�[�1�2����W�[�1�2rc�r�UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S	55 UR[R"S
55 UR[R"S55 UR[R"S55 UR[R"S
55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S55 UR[R"S 55 UR[R"S!55 UR[R"S"55 UR[R"S#55 UR[R"S$55 UR[R"S%55 UR[R"S&55 UR[R"S'55 UR[R"S(55 UR[R"S)55 UR[R"S*55 UR[R"S+55 g),Nrir�r�rrrtzfoo.zfoo zoozfoo*barzfoo?barzfoo"barzfoo<barzfoo>barzfoo:barzfoo|bar�nul�aux�prn�conzconin$zconout$�COM1�LPT9ucom¹ucom²ulpt³zNUL.txtzPRN  z	AUX  .txtzCOM1:barzLPT9   :barzbar.com9zbar.lpt9zc:/bar/baz/NULzc:/NUL/bar/bazz//./NULr�.s..�/s/foo/barsfoo.snul)r�r#�
isreservedr�rls r�test_isreserved�TestNtpath.test_isreserveds�������*�*�2�.�/�����*�*�3�/�0�����*�*�4�0�1�����*�*�3�/�0�����*�*�:�6�7�����)�)�&�1�2�����)�)�&�1�2�����)�)�&�1�2�����)�)�)�4�5�����)�)�)�4�5�����)�)�)�4�5�����)�)�)�4�5�����)�)�)�4�5�����)�)�)�4�5�����)�)�)�4�5�����)�)�%�0�1�����)�)�%�0�1�����)�)�%�0�1�����)�)�%�0�1�����)�)�(�3�4�����)�)�)�4�5�����)�)�&�1�2�����)�)�&�1�2�����)�)�)�4�5�����)�)�)�4�5�����)�)�)�4�5�	
����)�)�)�4�5�����)�)�'�2�3�����)�)�+�6�7�����)�)�*�5�6�����)�)�-�8�9�	
����*�*�:�6�7�����*�*�:�6�7�����)�)�*:�;�<�����)�)�*:�;�<�����*�*�9�5�6�����*�*�3�/�0�����*�*�4�0�1�����*�*�5�1�2�����*�*�4�0�1�����*�*�;�7�8�����)�)�'�2�3�����)�)�&�1�2rc�`�URUR5UR55 g)z<Assert that two strings are equal ignoring case differences.N)rRr�)rS�s1�s2s   r�
assertEqualCI�TestNtpath.assertEqualCIRs���������R�X�X�Z�0rzOS helpers require 'nt' modulec��[R"[R5nU[R
"U54H\n[R"U5n[R"U5Sn[R"U5SnURXE5 M^ [R"[R5upgURUS5 URUS5 [R"[RR55up�URX�5 URU	S5 [R[R4H�n[R"U5n
UR!U
["5 UR[%U
5S5 [R"UR55nUR!U[&5 UR[%U5S5 M� g)Nr)�nt�_getfinalpathnamer��
executabler%r<�_getvolumepathnamer#r�r��
_getdiskusage�exec_prefix�
assertGreaterr>rR�prefix�assertIsInstancer-�lenr,)rSr�r�volume_path�
path_drive�volume_path_drive�cap�free�b_cap�b_free�
final_path�b_final_paths            r�test_nt_helpers�TestNtpath.test_nt_helpersVst��
�)�)�#�.�.�9�
�����J� 7�7�D��/�/��5�K��*�*�4�0��3�J� &� 1� 1�+� >�q� A�����z�=�	8��$�$�S�_�_�5�	�����3��"����4��#��(�(����)?�)?�)A�B�
������$����6�1�%��Z�Z����0�D��-�-�d�3�J��!�!�*�c�2����s�:���2��/�/����
�>�L��!�!�,��6����s�<�0�!�4�1rr�z/Can only test junctions with creation on win32.c�l�[R"5n[R"U5 [R"S5 SSKnUR
SS5 UR[R"S55 UR[R"S55 UR[R"S5[R"S55 SSS5 SSS5 g![a [R"S5ef=f!,(df   N;=f!,(df   g=f)N�tmpdirr�testjuncz!creating the test junction failed)rr�r/r%r-�_winapi�CreateJunctionrrhrir�r#�
isjunctionr�rVr)rSrr�s   r�test_isjunction�TestNtpath.test_isjunctionts���
�
�
�
!�Q��%�%�a�(�����"��Q��*�*�8�Z�@����� 1� 1�*� =�>�� � ��!2�!2�8�!<�=��$�$�V�_�_�Z�%@�&�/�/�RZ�B[�\�)�"�
!���Q�"�+�+�,O�P�P�Q��
)�(��"�
!�s;�D%�D�	C0�BD�D%�0!D�D�
D"	�D%�%
D3c���[RnURU"S5S5 URU"S5S5 URU"S5S5 URU"S5S5 g)Nu/tmp�abcdsFs
/tmp�abcdsz
/tmpabcdss
/tmpabcds)r#�isfile�assertIs)rSrs  r�test_isfile_invalid_paths�$TestNtpath.test_isfile_invalid_paths�sZ�������
�
�f�.�/��7��
�
�f�-�.��6��
�
�f�_�-�u�5��
�
�f�-�.��6rz#drive letters are a windows conceptc��[RRS5nUb[U5S:wd	USS:wa[R
"S5eUR
[RRSU-55 g)N�SystemDrive�r��:z'SystemDrive is not defined or malformedz\\.\)	r%�environ�getr�rhrir�rr)rSr�s  r�test_isfile_driveletter�"TestNtpath.test_isfile_driveletter�s_���
�
���}�-���=�C��J�!�O�u�Q�x�3���#�#�$M�N�N���������	�E�(9�:�;r�pipezneed os.pipe()c�8�[R"5upUR[R"U55 [R
"U5 [R
"U5 g![R
"U5 [R
"U5 f=fr")r%rr�r#rr�)rS�pr�pws   r�test_isfile_anonymous_pipe�%TestNtpath.test_isfile_anonymous_pipe�s[��������	����V�]�]�2�.�/��H�H�R�L��H�H�R�L��
�H�H�R�L��H�H�R�L�s�%A+�+.Bzwindows onlyc
��SSKnS[R"53nURUURSSSSSS5nUR[R"U55 URU5 g!URU5 f=f)Nrz//./PIPE/python_isfile_test_r�)	r�r%�getpid�CreateNamedPipe�PIPE_ACCESS_INBOUNDr�r#r�CloseHandle)rSr��
named_pipe�hs    r�test_isfile_named_pipe�!TestNtpath.test_isfile_named_pipe�sx���3�B�I�I�K�=�A�
��#�#�J�$+�$?�$?�$%�q�!�Q��1�
6��	#����V�]�]�:�6�7�����"��G����"�s�%A7�7B
c�t�UR[RRS55 UR[RR	S55 UR[RRS55 UR
[RRS55 g)Nz\\.\CON)r�r%rr�isdir�islinkr��existsrls r�test_con_device�TestNtpath.test_con_device�sl����������
�3�4���������z�2�3���������
�3�4���������z�2�3rzFast paths are only for win32c�d�UR[RR[R
L5 UR
[R"[RR55 UR[RR[RL5 UR
[R"[RR55 UR[RR[RL5 UR
[R"[RR55 UR[RR[RL5 UR
[R"[RR55 UR[RR[R L5 UR
[R"[RR55 UR[RR"[R$L5 UR
[R"[RR"55 UR[RR&[R(L5 UR
[R"[RR&55 UR[RR*[R,L5 UR
[R"[RR*55 gr")r�r%rr�r��_path_splitroot_exr��inspect�
isfunctionr��_path_normpathr�_path_isdirr�_path_isfiler�_path_islinkr��_path_isjunctionr �_path_exists�lexists�
_path_lexistsrls r�test_fast_paths_in_use�!TestNtpath.test_fast_paths_in_use�s��	
������)�)�R�-B�-B�B�C�����+�+�B�G�G�,=�,=�>�?�������(�(�B�,=�,=�=�>�����+�+�B�G�G�,<�,<�=�>�������
�
����7�8�����+�+�B�G�G�M�M�:�;���������"�/�/�9�:�����+�+�B�G�G�N�N�;�<���������"�/�/�9�:�����+�+�B�G�G�N�N�;�<�������*�*�b�.A�.A�A�B�����+�+�B�G�G�,>�,>�?�@���������"�/�/�9�:�����+�+�B�G�G�N�N�;�<���������2�+;�+;�;�<�����+�+�B�G�G�O�O�<�=rr�zDev Drives only exist on Win32c�P�UR[R"[R5S5 UR[R"S5S5 UR[R"S5S5 UR[R"[
R"5S5S5 UR[R"S55 UR[5 [R"S5 SSS5 g!,(df   g=f)N)TFr�r�rz2\\?\Volume{00000000-0000-0000-0000-000000000000}\\)rYr#�
isdevdriverr�r%�listvolumesr�r�rr��_path_isdevdriverls r�test_isdevdrive�TestNtpath.test_isdevdrive�s���	
�
�
�f�'�'�	�(8�(8�9�=�I��
�
�f�'�'��,�m�<��
�
�f�'�'��-�}�=��
�
�f�'�'����(8��(;�<�m�L�����*�*�+`�a�b�
�
�
�w�
'���� U�V�(�
'�
'�s�7D�
D%z'isdevdrive fallback only used off Win32c�j�UR[R"[R55 gr")r�r#r2rr�rls r�test_isdevdrive_fallback�#TestNtpath.test_isdevdrive_fallback�s#��	
����*�*�9�+;�+;�<�=rr]N)Qr^r_r`rarmr{r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�skip_unless_symlinkrh�
skipUnless�HAVE_GETFINALPATHNAMErMrrrrrr r1r?rBrErPrS�HAVE_GETSHORTPATHNAMEr^rlrvr~r�r�requires_resourcer�r�r�r�r�r�r��skipIfrr�r�r�r�r�r�r�r�r�rrr/r%rrr!�cpython_onlyr/�namer5r8rbr]rrrdrd_s���
D�1�0=� XA�tB� 
S�
5�/�$"�O@�b
0�;�.\�`
A�D�Q��
6�
6�6��"�"�
���.�0H�I��2��$�'�(�M�)B�C�X�D�J�#�X�4�"�"�
���.�0H�I�Y�J�#�Y����.�0H�I�%[�J�%[�N���.�0H�I��2��$�'�(�M�)B�C�H�D�J�H�"�"�"�
���.�0H�I��2��$�'�(�M�)B�C�N�D�J�#�N��"�"�
���.�0H�I�5D�J�#�5D�n�"�"�
���.�0H�I�+O�J�#�+O�Z�"�"�
���.�0H�I�('�J�#�('�T�"�"�
���.�0H�I�22�J�#�22�h�"�"�
���.�0H�I��2��$�'�(�M�)B�C�8�D�J�#�8�@���.�0H�I�K�J�K����.�0H�I�
���.�0H�I�!?�J�J�!?�F���.�0H�I�*J�J�*J�XD�4����.�.�0L�M�E�N�E�&
���u�%�
8�&�
8�-@�b����;�<�*?�=�*?�XH�(:�0CR�J�_�_�]�$L�M�0�N�0�"D�H
3�63�p1�����=�>�5�?�5�:�_�_�S�\�\�W�,�._�`�
]�a�
]�7��_�_�S�\�\�W�,�.S�T�<�U�<������V�,�.>�?��@���_�_�S�\�\�W�,�n�=�	#�>�	#��_�_�S�\�\�W�,�n�=�4�>�4��_�_�S�\�\�W�,�.M�N����>��O�>�*�_�_�R�W�W��_�&F�G�W�H�W��_�_�R�W�W��_�&O�P�>�Q�>rrdc��\rSrSr\rS/rSrg)�NtCommonTesti�rr]N)r^r_r`rar#�
pathmodule�
attributesrbr]rrrCrC�s���J���JrrCc��\rSrSr\rSrSrSrSr	Sr
SrSrS	r
S
rSrSrS
rSrSrSrSrSrSrSrSrSrSrSrg)�
PathLikeTestsi�c�B�[RUl[[R5UlUR[RUR5 [URSS5nURS5 SSS5 g!,(df   g=f)N�xbrstest_ntpath.PathLikeTests)	rr��	file_namer�	file_pathr�rr�rM)rSras  r�setUp�PathLikeTests.setUp�sd��"�)�)���!�)�"2�"2�3������	�(�(�$�.�.�9�
�$�.�.�$��
*�d��J�J�3�4�+�
*�
*�s�5B�
Bc�h�URU"UR5U"UR55 gr")rVrKrJ)rS�funcs  r�_check_function�PathLikeTests._check_function�s$�����T�$�.�.�1�4����3G�Hrc�N�URURR5 gr")rPrr$rls r�test_path_normcase� PathLikeTests.test_path_normcase�������T�Y�Y�/�/�0rc�N�URURR5 gr")rPrr�rls r�test_path_isabs�PathLikeTests.test_path_isabs�������T�Y�Y�_�_�-rc��URURRS[S5S5URRSSS55 g)Nr��br	)rRrr6rrls r�test_path_join�PathLikeTests.test_path_join�s;�����������X�c�]�C�@�������S�#�6�	8rc�N�URURR5 gr")rPrr�rls r�test_path_split�PathLikeTests.test_path_split�rYrc�N�URURR5 gr")rPr�splitextrls r�test_path_splitext� PathLikeTests.test_path_splitext�rUrc�N�URURR5 gr")rPrr�rls r�test_path_splitdrive�"PathLikeTests.test_path_splitdrive�������T�Y�Y�1�1�2rc�N�URURR5 gr")rPrr�rls r�test_path_splitroot�!PathLikeTests.test_path_splitroots�����T�Y�Y�0�0�1rc�N�URURR5 gr")rPrr>rls r�test_path_basename� PathLikeTests.test_path_basenamerUrc�N�URURR5 gr")rPrr�rls r�test_path_dirname�PathLikeTests.test_path_dirname������T�Y�Y�.�.�/rc�N�URURR5 gr")rPrrrls r�test_path_islink�PathLikeTests.test_path_islink	s�����T�Y�Y�-�-�.rc�N�URURR5 gr")rPrr-rls r�test_path_lexists�PathLikeTests.test_path_lexistsrrrc�N�URURR5 gr")rPrr�rls r�test_path_ismount�PathLikeTests.test_path_ismountrrrc�N�URURR5 gr")rPr�
expanduserrls r�test_path_expanduser�"PathLikeTests.test_path_expanduserrhrc�N�URURR5 gr")rPrr�rls r�test_path_expandvars�"PathLikeTests.test_path_expandvarsrhrc�N�URURR5 gr")rPrr�rls r�test_path_normpath� PathLikeTests.test_path_normpathrUrc�N�URURR5 gr")rPrr�rls r�test_path_abspath�PathLikeTests.test_path_abspathrrrc�N�URURR5 gr")rPrrrls r�test_path_realpath� PathLikeTests.test_path_realpathrUrc�N�URURR5 gr")rPrrrls r�test_path_relpath�PathLikeTests.test_path_relpath!rrrc��URRURUR/5nUR	XR5 gr")rr�rKrJrV)rS�common_paths  r�test_path_commonpath�"PathLikeTests.test_path_commonpath$s5���i�i�*�*�D�N�N�D�N�N�+K�L�����[�.�.�9rc�N�URURR5 gr")rPrrrls r�test_path_isdir�PathLikeTests.test_path_isdir(rYr)rJrKN)r^r_r`rar#rrLrPrSrWr\r_rcrfrjrmrprtrwrzr~r�r�r�r�r�r�r�rbr]rrrGrG�sv���D�5�I�1�.�8�.�1�3�2�1�0�/�0�0�3�3�1�0�1�0�:�.rrG�__main__)&r%r#r%rrdr�rhr?rr�r�test.supportrr�test.support.os_helperrr�tempfiler	r��ImportErrorr�r<�AttributeErrorr
r=rr1rGrM�TestCaserOrd�
CommonTestrCrGr^�mainr]rr�<module>r�s���
�	�
��
��� ��1�+�!�"��
�!�
���!��#��!��
#��<�0E�3�X�&�&�3�x>��x>�v+�#�.�.��0A�0A��
J.�N�J.�Z�z���M�M�O���s0��
�B����"�!��"���"�!��"�s6�C�
C �C.�C�C� C+�*C+�.C9�8C9

Youez - 2016 - github.com/yon3zu
LinuXploit